package lab.javacore.collections.student;
import java.util.HashMap;
import java.util.Map;

public class Course {
	
	private Integer id;
	private String name;
	private String category;
	
	private static Map<Integer,Course> list = new HashMap<Integer,Course>();
	
	static {
		Course c1 = new Course(1,"Java Exceptions", "Java Core Programming");
		Course c2 = new Course(2,"Java Collections", "Java Core Programming");
		Course c3 = new Course(3,"Java Generics", "Java Core Programming");
		
		list.put(c1.getId(),c1);
		list.put(c2.getId(),c2);
		list.put(c3.getId(),c3);
	}
	
	
	public Course(int id, String name, String category) {
		super();
		this.id = id;
		this.name = name;
		this.category = category;
	}

	

	public static Map<Integer, Course> getList() {
		return list;
	}



	public Integer getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getCategory() {
		return category;
	}
}
